<?php

namespace catchAdmin\phone\request\need;

use catcher\base\CatchRequest;

class saveRequest extends CatchRequest
{
    protected $needCreatorId = false;


    protected function rules(): array
    {
        $param = request()->param();

        // 3=物资工厂
        if ($param['company_type'] == 3) {
            return [
                'goods_name|物资名称'   => 'require',
                'goods_attr|规格'       => 'require',
                'goods_num|数量'        => 'require',
                'need_yao_qiu|质量要求' => 'require',
                'need_time|供货时间'    => 'require',

                'need_pay_type|付款方式'             => 'require',
                'need_city_code|项目所在地'          => 'require',
//                'need_city_address|详细地址'         => 'require',
                'company_yao_qiu|对供应商公司的要求' => 'require',
                'need_ent_date|本信息截止时间'       => 'require',
            ];
            // 2=工程公司
        } elseif ($param['company_type'] == 2) {
            return [
                'need_title|标题'            => 'require',
                'need_type|工程类型'         => 'require',
                'need_amount|预估工程款总额' => 'require',
                'need_yao_qiu|工程要求'      => 'require',
                'need_time|施工时间'         => 'require',

                'need_pay_type|付款方式'           => 'require',
                'need_city_code|项目所在地'        => 'require',
//                'need_city_address|详细地址'       => 'require',
                'company_yao_qiu|对工程公司的要求' => 'require',
                'need_ent_date|本信息截止时间'     => 'require',
            ];
            // 6=劳务公司
        } elseif ($param['company_type'] == 6) {
            return [
                'need_title|标题'            => 'require',
                'need_type|劳务类型'         => 'require',
                'need_amount|预估劳务费总额' => 'require',
                'need_yao_qiu|施工要求'      => 'require',
                'need_time|施工时间'         => 'require',

                'need_pay_type|付款方式'           => 'require',
                'need_city_code|项目所在地'        => 'require',
//                'need_city_address|详细地址'       => 'require',
                'company_yao_qiu|对劳务队伍的要求' => 'require',
                'need_ent_date|本信息截止时间'     => 'require',
            ];
            // 4=设计公司
        } elseif ($param['company_type'] == 4) {
            return [
                'need_title|标题'            => 'require',
                'need_type|设计业务类型'     => 'require',
                'need_amount|预估设计费总额' => 'require',
                'need_yao_qiu|设计要求'      => 'require',
                'need_time|设计时间'         => 'require',

                'need_pay_type|付款方式'           => 'require',
                'need_city_code|项目所在地'        => 'require',
//                'need_city_address|详细地址'       => 'require',
                'company_yao_qiu|对设计公司的要求' => 'require',
                'need_ent_date|本信息截止时间'     => 'require',
            ];
            // 5=监理公司
        } elseif ($param['company_type'] == 5) {
            return [
                'need_title|标题'            => 'require',
                'need_type|监理业务类型'     => 'require',
                'need_amount|预估监理费总额' => 'require',
                'need_yao_qiu|监理要求'      => 'require',
                'need_time|监理时间'         => 'require',

                'need_pay_type|付款方式'           => 'require',
                'need_city_code|项目所在地'        => 'require',
//                'need_city_address|详细地址'       => 'require',
                'company_yao_qiu|对监理公司的要求' => 'require',
                'need_ent_date|本信息截止时间'     => 'require',
            ];
            // 7=贸易公司
        } elseif ($param['company_type'] == 7) {
            return [];
            // 8=行业协会
        } elseif ($param['company_type'] == 8) {
            return [];
        } else {
            return [];
        }
    }


    protected function message(): array
    {
        return [
        ];
    }
}
